package com.bootdo.clouddoES.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * RabbitMq消费者示例
 *
 * @Author YUBIN
 * @create 2018-08-08
 */
@Component
//@RabbitListener(queues = {"hello-queue","user-queue"})
public class InterfaceConsumerDemo {
    private static Logger logger = LoggerFactory.getLogger(InterfaceConsumerDemo.class);

    //@RabbitHandler
    @RabbitListener(queues = "hello-queue")
    public String executeHello(String message) {

        logger.info("executeHello================接收到的消息是:" + message);
        return  message;
    }



}